

@keyframes myfirst
{
from {background: red;left:0}
to {background: yellow;left:100px;}
}

@-moz-keyframes myfirst /* Firefox */
{
from {background: red;}
to {background: yellow;}
}

@-webkit-keyframes myfirst /* Safari 和 Chrome */
{
from {background: red;}
to {background: yellow;}
}

@-o-keyframes myfirst /* Opera */
{
from {background: red;}
to {background: yellow;}
}



.test{
    position:relative;
    animation: myfirst 5s;
    -moz-animation: myfirst 5s;	/* Firefox */
    -webkit-animation: myfirst 5s;	/* Safari 和 Chrome */
    -o-animation: myfirst 5s;	/* Opera */
    color: green;
}

.red{
    position:relative;
    left:100px;
    color:red;

}
.green{
    position:relative;
    left:100px;
    color:green;
}